<?php


namespace app\common\controller;


use think\App;

class AdminController extends UserController
{

    function __construct(App $app = null)
    {
        parent::__construct($app);
        $this->checkAdmin();
    }
    function checkAdmin(){
        if(!self::$user->is_admin){
            $this->result_error("您不是管理员",-10000,"请登录");
        }
    }
}